<?php
/**
 * 景区介绍
 * Created by PhpStorm.
 * User: wanghaibo
 * Date: 17/12/5
 * Time: 17:44
 */

namespace App\Http\Controllers\Admin\Coopen;


use App\Http\Controllers\Controller;
use App\Http\Controllers\Admin\Coopen\Service\Coopen;
use App\Post;
use Illuminate\Http\Request;

class CoopenController extends Controller
{
    private $manager;
    public function __construct ()
    {
        $this->manager = new Coopen();

    }

    public function index(){
        $model = $this->manager->get();
        return view('admin.coopen.coopen.index',[
            'model' =>  $model
        ]);
    }
    public function update(Request $request){
        $post = $request->post();
        $this->manager->update($request->post());
        return redirect()->route('admin.coopen.coopen')->with(
            $this->success()
        );
    }
    public function videoList(){
        $comboManager = new Post();
        return view('admin.coopen.coopen.videoList',[
            'status' =>    $comboManager->getStatusList(),
            'manager'   =>  $comboManager,
            'routePrefix'   =>  'admin.coopen.coopen',
        ]);
    }
}